/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.risk.control.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hopes.bizz.risk.control.dto.RiskControlMeasureDTO;
import com.hopes.bizz.risk.control.entity.RiskControlMeasureEntity;
import com.hopes.bizz.risk.control.vo.RiskControlMeasureVO;
import com.hopes.boss.common.data.datascope.BossBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 风险管控措施
 *
 * @author pig
 * @date 2023-07-19 16:16:03
 */
@Mapper
public interface RiskControlMeasureMapper extends BossBaseMapper<RiskControlMeasureEntity> {

    /**
     * 列表查询
     * @param param 查询参数
     * @param orderColumn 排序
     * @return 查询结果
     */
    List<RiskControlMeasureVO> queryForList(@Param("entity") RiskControlMeasureDTO param, @Param("orderColumn") String orderColumn);


    /**
     * 风险管控清单列表查询
     * @param riskControlMeasureDTO 过滤对象
     * @param orderColumn           排序
     * @return                      查询结果
     */
    List<RiskControlMeasureVO> listRiskDetailed(@Param("entity") RiskControlMeasureDTO riskControlMeasureDTO, @Param("orderColumn") String orderColumn);


    /**
     * 分页查询
     * @param page
     * @param riskControlMeasureDTO
     * @return
     */
    Page<RiskControlMeasureVO> listWithTaskPage(Page<RiskControlMeasureVO> page,  @Param("entity")  RiskControlMeasureDTO riskControlMeasureDTO);

    /**
     * 分页查询
     * @param page
     * @param riskControlMeasureDTO
     * @return
     */
    Page<RiskControlMeasureVO> listControlMeasure(Page<RiskControlMeasureVO> page,  @Param("entity") RiskControlMeasureDTO riskControlMeasureDTO);

    /**
     * 通过管控措施批量保存
     * @param riskControlMeasureList
     */
    void batchSaveByVO(List<RiskControlMeasureVO> riskControlMeasureList);

    List<RiskControlMeasureEntity> queryByRiskUnitIdList(List<Long> list);
}
